/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.net.greenet.logmanage.logic.bean;

import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import java.sql.Timestamp;

/**
 *
 * @author dongqiang
 */
@DatabaseTable(tableName="AckOutGoingLog")
public class AckOutGoingLogBean {
    public static final String ID = "id";
    public static final String MESSAGE_TYPE = "messageType";
    public static final String MESSAGE_NO = "messageNo";
    public static final String MESSAGE_SEQUENCE_NO = "messageSequenceNo";
    public static final String MESSAGE_SERIAL_NO = "messageSerialNo";
    public static final String CONTENT = "content";
    public static final String SENDTIME = "sendTime";
    public static final String INCOMING_MESSAGE_LOG_ID = "InComingMessageLog_id";
    public static final String DPI_ENDPOINT_BEAN_ID = "DPIEndPointBean_id";
    
    @DatabaseField(columnName=ID, id=true)
    private long id;
    @DatabaseField(columnName=MESSAGE_TYPE)
    private String messageType;
    @DatabaseField(columnName=MESSAGE_NO)
    private int messageNo;
    @DatabaseField(columnName=MESSAGE_SEQUENCE_NO)
    private long messageSequenceNo;
    @DatabaseField(columnName=MESSAGE_SERIAL_NO)
    private long messageSerialNo;
    @DatabaseField(columnName=CONTENT, dataType=DataType.BYTE_ARRAY)
    private byte[] content;
    @DatabaseField(columnName=SENDTIME, dataType=DataType.TIME_STAMP)
    private Timestamp sendTime;
    @DatabaseField(columnName=INCOMING_MESSAGE_LOG_ID, foreign=true)
    private MessageInComingLogBean messageInComing;
    @DatabaseField(columnName=DPI_ENDPOINT_BEAN_ID, foreign=true)
    private DPIEndPointBean dpi;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public int getMessageNo() {
        return messageNo;
    }

    public void setMessageNo(int messageNo) {
        this.messageNo = messageNo;
    }

    public long getMessageSequenceNo() {
        return messageSequenceNo;
    }

    public void setMessageSequenceNo(long messageSequenceNo) {
        this.messageSequenceNo = messageSequenceNo;
    }

    public long getMessageSerialNo() {
        return messageSerialNo;
    }

    public void setMessageSerialNo(long messageSerialNo) {
        this.messageSerialNo = messageSerialNo;
    }

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        this.content = content;
    }

    public Timestamp getSendTime() {
        return sendTime;
    }

    public void setSendTime(Timestamp sendTime) {
        this.sendTime = sendTime;
    }

    public MessageInComingLogBean getMessageInComing() {
        return messageInComing;
    }

    public void setMessageInComing(MessageInComingLogBean messageInComing) {
        this.messageInComing = messageInComing;
    }

    public DPIEndPointBean getDpi() {
        return dpi;
    }

    public void setDpi(DPIEndPointBean dpi) {
        this.dpi = dpi;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || obj.getClass() != getClass()) {
            return false;
        }
        return id == ((AckOutGoingLogBean)obj).id;
    }
    
}
